<?php
class Tag extends EMongoDocument // Notice: We extend EMongoDocument class instead of CActiveRecord
{
    //昵称
    public $name_zn;
    public $name_en;

    /**
     * This method have to be defined in every Model
     * @return string MongoDB collection name, witch will be used to store documents of this model
     */
    public function getCollectionName()
    {
        return 'tag';
    }
 
    // We can define rules for fields, just like in normal CModel/CActiveRecord classes
    public function rules()
    {
        return array(
        
        );
    }

    // the same with attribute names
    public function attributeNames()
    {
        return array(
            //'ad' => 'ad',
            'name_zn'=>'name_zn',
            'name_en'=>'name_en',
            '_id'=>'_id',
        );
    }

    /**
     * This method have to be defined in every model, like with normal CActiveRecord
     */
    public static function model($className=__CLASS__)
    {
        return parent::model($className);
    }
}